<?php

// uncomment the following to define a path alias
// Yii::setPathOfAlias('local','path/to/local-folder');

// This is the main Web application configuration. Any writable
// CWebApplication properties can be configured here.
//return CMap::mergeArray(
return array(
	'basePath' => PROTECTED_PATH,
	'name' => '开拍网后台管理系统',
	'defaultController' => 'index',
	'charset' => 'utf-8', 
	//'theme' => '', //aquincum
	'language'=>'zh_cn',
	//'sourceLanguage' => 'en_us',
	
	'import' => require PROTECTED_PATH . '/config/autoload.php',
	// preloading 'log' component
	'preload'=>array('log'),
	
	// application components
	'components'=>array(
		//'themeManager' => array(),
		'user'=>array(
			// enable cookie-based authentication
			'allowAutoLogin' => false,
			'loginUrl' => BASE_URL . 'login'
		),
		'clientScript' => array(
			//关闭Yii自带的js
			'enableJavaScript' => false
		),
		'db' => require PROTECTED_PATH . '/config/database.php',
		'cache' => array(
			'class' => 'CFileCache', //CDummyCache
	        //'cachePath' => BASE_PATH . '/../manage/protected/runtime/cache',
	        //'keyPrefix' => 'iweb'
		),
		'urlManager' => require PROTECTED_PATH . '/config/routes.php',
		//'authManager' => array(
		//	'class' => 'CDbAuthManager',
		//	'connectionID'=>'db',
		//),
		'errorHandler'=>array(
			//'errorAction'=>'index/error',
		),
		'log'=>array(
			'class'=>'CLogRouter',
			'routes'=>array(
				/*
				array(
					'class'=>'CFileLogRoute',
					'levels'=>'error, warning',
				),
				// uncomment the following to show log messages on web pages
				array(
					'class' => 'CWebLogRoute',
					'categories'=>'system.db.*',
					'levels'=>'error, warning',
					//显示在firebug中
					'showInFireBug' => true
				),
				*/
				array(
					'class' => 'CProfileLogRoute',
					'showInFireBug' => true
				)
			)
		),
		'request' => array(
			'class' => 'application.components.MCHttpRequest',
			//开启CSRF防范
			'enableCsrfValidation' => false,
			//开启cookie验证
			'enableCookieValidation' => true,
		),
		'util'=>array(
			'class' => 'ext.utils.UtilHelper'
		)
	),
	'modules' => require PROTECTED_PATH . '/config/modules.php',
	'params' => require PROTECTED_PATH . '/config/params.php'
);